1. Field of the Invention
The present invention generally relates to compander circuits, and more particularly to a compander circuit which functions as a compressor for compressing an input signal and/or an expander for expanding an input signal.
Recently, wireless automobile telephones, cordless telephones and digital telephones using digital line circuits have become widespread. Nowadays, it is required to reduce the production cost and the size of communications devices as described above. Normally, a compander circuit functioning as a compressor and/or an expander is used to prevent the degradation of speech communications quality and the signal-to-noise ratio (S/N ratio).
2. Description of the Prior Art
FIG. 1 is a block diagram of a conventional compander circuit, which is made up of an input terminal 10, an electronic volume controller 11, an output terminal 12, a rectifier circuit 13, a low-pass filter (LPF) 14, a comparator 15, an up/down counter 16, a control terminal 17 and an electronic volume controller 18. When the compander circuit is used as a compressor, the input terminal of the rectifier circuit 13 is connected to the output terminal of the electronic volume controller 11, as shown by the broken line. When the compander circuit is used as an expander, the input terminal of the rectifier circuit 13 is connected to the input terminal 10, as shown by the one-dot chained line. More particularly, when the compander operates as the compressor, an input signal Vin applied to the input terminal 10 is applied to the electronic volume controller 11, and an output signal Vout having a level adjusted by the electronic volume controller 11 is output to a signal processing circuit of the next stage via the output terminal 12 and to the rectifier circuit 13. When the compander operates as an expander, the input signal Vin is directly applied to the rectifier circuit 13.
The rectifier circuit 13 performs the full-wave rectifying operation on the input signal Vin or the output signal Vout. The rectified signal is smoothed by the low-pass filter 14, and is applied to the inverting input terminal of the comparator 15. The electronic volume controller 18 adjusts the level of a constant voltage Vc applied to the control terminal 17, and is applied to the non-inverting input terminal of the comparator 15. The comparator 15 compares the voltages applied to the two input terminals, and outputs the voltage equal to the difference between these voltages to an up/down count control terminal U/D of the up/down counter 16.
The up/down counter 16 counts down a clock applied to a clock terminal CK when the output signal of the comparator 15 is at a low level, and counts up the clock when the output signal of the comparator 15 is at a high level. The counter value is applied to the electronic volume controllers 11 and 18 as a gain control code. The gains of the electronic volume controllers 11 and 18 are controlled so that the output signal of the low-pass filter 14 has almost the same level as the output signal of the electronic volume controller 18. Hence, the output signal Vout output via the output terminal 12 has an expanded or compressed level. When the compander operates as the compressor, the gain of the electronic volume controller 11 becomes larger as the level of the input signal Vin becomes lower to hence increase the level of the output signal Vout. When the compander operates as the expander, the gain of the electronic volume controller 11 becomes smaller as the level of the input signal Vin becomes higher to hence decrease the level of the output signal Vout.
FIG. 2 is a diagram showing the operation of the compander which operates as the compressor and the operation thereof which operates as the expander. Normally, the compressor is provided in a transmitter system of a radio communications device such as an automobile telephone set. The compressor processes a voice signal from a microphone so that the voice signal has a higher level as the level of the voice signal from the microphone becomes lower. The expander is provided in a receiver system, and processes the voice signal to be applied to a speaker so that the voice signal applied thereto has a lower level as the voice signal applied to the expander becomes low. As shown in FIG. 2, if a noise of -60 dB is superimposed on a transmission system, the noise is suppressed to -120 dB at the receiver side, so that the noise can be substantially eliminated and the good communications quality can be ensured.
Meanwhile, the compander circuit has a transient response such that natural voice can be reproduced.
FIG. 3A shows an example of the input signal Vin, and FIG. 3B shows the waveform of the output signal Vout output by the compressor having the structure shown in FIG. 1. FIG. 3C shows the waveform of the output signal Vout output by the expander having the structure shown in FIG. 1. As shown in FIG. 3B, the output waveform of the compressor which receives an abrupt rise of the input signal rises abruptly, and gradually decreases to a constant level. The time necessary for the above operation to be completed is called "attack time". Further, as shown in FIG. 3B, the output waveform of the compressor which receives an abrupt fall of the input signal falls abruptly, and gradually increases to a constant level. The time necessary for the above operation to be completed is called "recovery time". Similarly, the expander has an attack time and a recovery time.
The lengths of the attach and recovery times influence the quality of the reproduced voice. For example, when the attack time is short, the reproduced voice has little noise but is not a natural voice. The attack and recovery times depend on the time constant (frequency characteristic) of the low-pass filter 14. That is, in order to adjust the attack and recovery times, it is necessary to finely adjust the time constant of the low-pass filter 14.
However, the conventional compander described above has the following disadvantages.
Generally, the low-pass filter 14 is formed of a resistor and a capacitor. Hence, in order to realize the fine adjustment of the time constant of the low-pass filter 14, it is necessary to use a plurality of resistors and capacitors. This increases the circuit size. Further, if the precision of the resistors and/or capacitors is poor, the desired attack and recovery times cannot be obtained. Furthermore, the time constant of the low-pass filter 14 relating to charging is equal to that relating to discharging, and it is impossible to set the attack and recovery time to be different from each other.
The transmitter system needs the compressor characteristic in order to prevent an excessive input level, but needs the expander characteristic in order to suppress ambient noise. That is, there is a case where the compressor characteristic is needed when the input signal level is high, the expander characteristic is needed when the input signal level is low. However, the structure shown in FIG. 1 does not selectively function as the compressor or expander. That is, when the connection indicated by the broken line shown in FIG. 1 is employed, the structure shown in FIG. 1 cannot operate as the expander.
Furthermore, the output signal of the low-pass filter 14 contains a ripple component having a frequency higher than the cut-off frequency of the low-pass filter 14, and thus varies. The output levels of the electronic volume controllers 11 and 18 vary stepwise. Hence, if the output level of the low-pass filter 14 is constant but corresponds to a level located between stepwise levels of the electronic volume controllers 11 and 18, the output levels of the electronic volume controllers 11 and 18 do not completely coincide with the output level of the low-pass filter 14. Hence, the output signals of the electronic volume controllers 11 and 18 rise and fall repeatedly. That is, the gains of the electronic volume controllers 11 and 18 vary. This causes noise superimposed in the output signal Vout of the compander output via the output terminal 12.